version: '3'
services:
  ${projectCode}:
    image: 10.6.64.142/mining/{BRANCH_NAME}/${projectCode}:{BUILD_NUMBER}
    deploy:
      replicas: 1
      resources:
        limits:
          cpus: '2'
          memory: 4g
        reservations:
          cpus: '0.1'
          memory: 1g
    networks:
      - mining-net
    expose:
      - "80"
    volumes:
      - /data/shared/sit/hy:/hy
    healthcheck:
      test: ["CMD", "nc", "-zvw3", "localhost:80"]
      start_period: 10s
      interval: 5s
      timeout: 3s
      retries: 20
    restart: unless-stopped
networks:
  mining-net :
    external: true